﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link href="../Content/newsstyle.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/jquery.news.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#newsbody #slider').cycle({ fx: 'scrollLeft', manualTrump: true, speed: '500', timeout: '10000', pager: '#sliderNav ul', pagerAnchorBuilder: function (index, dom) {
                var indexText = ''; if (index == 0) { indexText = 'one'; } else if (index == 1) { indexText = 'two'; } else if (index == 2) { indexText = 'three'; } else if (index == 3) { indexText = 'four'; }
                var link = '<li class="' + indexText + '"><a class="" href="#">' + index + '</a></li>'; return link;
            }, next: '.next', prev: '.previous'
            }); $('#footer .inner ul li:last, #footer .inner ul li:eq(2)').css("border", "none"); $("#header #navs ul#mainNav li a").hover(function () { $(this).parent().addClass("hover"); }, function () { $(this).parent().removeClass("hover"); }); $("a[rel^='prettyPhoto']").prettyPhoto({ animationSpeed: 'fast', padding: 40, opacity: 0.35, showTitle: true, allowresize: true, counter_separator_label: '/', theme: 'light_rounded', callback: function () { return false; } }); $('input[type=text],input[type=password], textarea').focus(function () { if (!$(this).hasClass('wrong')) { $(this).addClass('ok'); $(this).prevAll('label:first').addClass('ok'); } }).blur(function () {
                if ($(this).val().length <= 0)
                { $(this).prevAll('label:first').removeClass('ok'); $(this).removeClass('ok'); $(this).nextAll('.img:first').removeClass('ok'); }
            }); $('input.mark, textarea.mark').each(function () {
                if ($(this).nextAll('div.message').children('p:first').text().length > 0) { markWrong($(this)); }
                else { if ($(this).val().length > 0) { markOk($(this)); } }
            }); $("input:text:first:visible").focus(); $('form[action="/contacts/help"]').find('#subject,#comment').blur(function () { ajaxValidate($(this), "/contacts/ajax_validate"); }); $('form[action="/users/update_password"]').find('#password_existing, #password, #password_confirm').blur(function () { ajaxValidate($(this), "/users/ajax_validate"); }); $('form[action="/user_profiles/edit_public_name"]').find('#public_name').blur(function () { ajaxValidate($(this), "/user_profiles/ajax_validate"); }); $('form[action="/user_profiles/edit_pledge_details"]').find('#amount').blur(function () { ajaxValidate($(this), "/user_profiles/ajax_validate"); }); $('form[action="/users/sign_up_1/beta"]').find('#email, #password, #password_confirm').blur(function () { ajaxValidate($(this), "/users/ajax_validate"); }); $('form[action="/users/sign_up_2"]').find('#amount, #public_name').blur(function () { ajaxValidate($(this), "/user_profiles/ajax_validate"); }); $('form[action="/users/sign_up_business_1"]').find('#email, #password, #password_confirm').blur(function () { ajaxValidate($(this), "/users/ajax_validate"); }); $('form[action="/users/sign_up_business_2"], form[action="/business_profiles/edit_business_details"]').find('#name,#domain,#primary_contact,#phone,#payment_email').blur(function () { ajaxValidate($(this), "/business_profiles/ajax_validate"); }); $('form[action="/users/sign_up_business_2"], form[action="/business_profiles/edit_business_details"]').find('#street_address,#city,#state,#country_id,#post_code').blur(function () { ajaxValidate($(this), "/addresses/ajax_validate"); }); $('form[action="/beta_users/index"]').find('#email').blur(function () { ajaxValidate($(this), "/beta_users/ajax_validate"); }); $('form[action="/contacts/contact"]').find('#name, #email, #comment').blur(function () { ajaxValidate($(this), "/contacts/ajax_validate"); }); var qTipNewDefaults = jQuery.extend(true, {}, qTipDefaults); qTipNewDefaults.show = 'keydown'; qTipNewDefaults.content = 'We will never sell or pass your email address onto anyone else'; $('form[action="/users/sign_up_1/beta"] #email').qtip(qTipNewDefaults); qTipDefaults.content = 'If you want to stay anonymous, just leave your support name blank'; $('form[action="/users/sign_up_2"] #public_name').qtip(qTipDefaults); qTipNewDefaults.content = 'We will never sell or pass your email address onto anyone else'; $('form[action="/users/sign_up_business_1"] #email').qtip(qTipNewDefaults); qTipNewDefaults.content = 'This is how your site will be identified to end users on the site.'; $('form[action="/users/sign_up_business_2"] #name, form[action="/business_profiles/edit_business_details"] #name').qtip(qTipNewDefaults); qTipDefaults.content = 'e.g. www.mydomain.com'; $('form[action="/users/sign_up_business_2"] #domain, form[action="/business_profiles/edit_business_details"] #domain').qtip(qTipDefaults); qTipDefaults.content = 'Who should we ask for at your company if we need to get in touch?'; $('form[action="/users/sign_up_business_2"] #primary_contact, form[action="/business_profiles/edit_business_details"] #primary_contact').qtip(qTipDefaults); qTipDefaults.content = 'This should be the PayPal email address where you wish payments to be sent'; $('form[action="/users/sign_up_business_2"] #payment_email, form[action="/business_profiles/edit_business_details"] #payment_email').qtip(qTipDefaults); $('img.currency').click(function ()
            { $(this).prev().attr('checked', 'checked'); $('span.minmax span').text($(':radio:checked').attr('symbol')); }); $(':radio[name="data[UserProfile][currency_id]"]').change(function ()
            { $('span.minmax span').text($(':radio:checked').attr('symbol')); }).change(); $("#amountslider").slider({ min: 5, max: 100, value: !isNaN($("#amount").val()) ? $("#amount").val() : '', step: 1, slide: function (event, ui) { $("#amount").val(ui.value + '.00'); }, stop: function (event, ui) { $('#amount').blur(); } }); $("#amount").keyup(function () { if (!isNaN($(this).val())) { $("#amountslider").slider('value', $(this).val()); } }).keyup().focus(function () { $(this).select(); }); $("#qa .answer").parent().hide(); $("#qa .question").parent().css("cursor", "pointer").click(function () {
                if ($(this).next().css("display") == "none") { $(this).next().show(); $.scrollTo($(this), 800); } else { $(this).next().hide(); }
                return false;
            }); $("#questionNav .expand").click(function () { $(".answer").parent().show(); return false; }); $("#questionNav .collapse").click(function () { $(".answer").parent().hide(); return false; }); $('#side .call a.signup').hover(function () { $('#side .call').css("background-position", "bottom"); }, function () { $('#side .call').css("background-position", "top"); }); $('#slider .sliderItem .call a.signup').hover(function () { $('#slider .sliderItem .call').css("background-position", "bottom"); }, function () { $('#slider .sliderItem .call').css("background-position", "top"); }); $('#screenshots #blogSignup .call a.signup').hover(function () { $('#screenshots #blogSignup .call').css("background-position", "bottom"); }, function () { $('#screenshots #blogSignup .call').css("background-position", "top"); }); $('#about .call a.learn').hover(function () { $('#about .call').css("background-position", "bottom"); }, function () { $('#about .call').css("background-position", "top"); }); $(".message.warning, .message.success, .message.info").fadeIn("slow"); $('#screenshots .ss img').hover(function () { $(this).next().css("display", "block"); }, function () { $(this).next().css("display", "none"); }); $('#screenshots .ss img.zoom').hover(function () { $(this).css("display", "block"); }, function () { $(this).css("display", "none"); });
        });
    </script>
    <script type="text/javascript">
        function loadXML(xmlFile) {
            var xmlDoc;
            if (!window.ActiveXObject) {
                var parser = new DOMParser();
                xmlDoc = parser.parseFromString(xmlFile, "text/xml");
            } else {
                xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
                xmlDoc.async = "false";
                xmlDoc.load(xmlFile);
            }
            return xmlDoc;
        }
        var xmlDoc = loadXML("../Sources/News.xml");
        //解析xml文件，判断是否出错 
        if (xmlDoc.parseError.errorCode != 0) {
            alert(xmlDoc.parseError.reason);
        } 
        //获得根节点
        var nodes = xmlDoc.documentElement.childNodes;
    </script>
</head>
<body>
    <div id="newsbody">
        <div id="slider">
            <div class="sliderItem" id="slide1">
                <script type="text/javascript">
                    document.write("<h3>" + nodes(0).firstChild.nodeTypedValue + "</h3>");
                    document.write("<img src='" + nodes(0).lastChild.nodeTypedValue + "' alt='' />")
                </script>
            </div>
            <!-- /sliderItem -->
            <div class="sliderItem" id="slide2" style="display: none">
                <script type="text/javascript">
                    document.write("<h3>" + nodes(1).firstChild.nodeTypedValue + "</h3>");
                    document.write("<img src='" + nodes(1).lastChild.nodeTypedValue + "' alt='' />")
                </script>
            </div>
            <!-- /sliderItem -->
            <div class="sliderItem" id="slide3" style="display: none">
               <script type="text/javascript">
                   document.write("<h3>" + nodes(2).firstChild.nodeTypedValue + "</h3>");
                   document.write("<img src='" + nodes(2).lastChild.nodeTypedValue + "' alt='' />")
                </script>
            </div>
            <!-- /sliderItem -->
            <div class="sliderItem" id="slide4" style="display: none">
                <script type="text/javascript">
                    document.write("<h3>" + nodes(3).firstChild.nodeTypedValue + "</h3>");
                    document.write("<img src='" + nodes(3).lastChild.nodeTypedValue + "' alt='' />")
                </script>
            </div>
        </div>
        <div id="sliderNav">
            <a href="#" class="previous">Previous</a>
            <ul>
            </ul>
            <a href="#" class="next">Next</a>
        </div>
    </div>
    <script type="text/javascript">
        delete (xmlDoc);
    </script>
</body>
</html>
